package jalus.pojo;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.StringUtils;

/**
 * 豆瓣收藏POJO
 * 
 *
 */
public class CollectionEntry implements Serializable{
	private static final long serialVersionUID = 4335886876268364199L;
	private String id;
	private String title;
	private Date date;
	private String subjectLink;
	private String status;
	private Subject subject;
	private String summary;
	private List<String> tagList;
	private int rating;
	private int maxRating;
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	public String getSubjectLink() {
		return subjectLink;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public String getSummary() {
		return summary;
	}
	public void setSubjectLink(String subjectLink) {
		this.subjectLink = subjectLink;
	}
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	public String getVStatus(){
		if(StringUtils.isNotEmpty(this.status)){
			if(this.status.equals("read")){
				this.status = "读过";
			}else if(this.status.equals("reading")){
				this.status = "在读";
			}else if(this.status.equals("watched")){
				this.status = "看过";
			}else if(this.status.equals("watching")){
				this.status = "在看";
			}else if(this.status.equals("listened")){
				this.status = "听过";
			}else if(this.status.equals("listening")){
				this.status = "在听";
			}else if(this.status.equals("wish")){
				if(StringUtils.isNotEmpty(this.id)){
					return this.status;
				}
				if(id.contains("book")){
					this.status = "想读";
				}else if(id.contains("movie")){
					this.status = "想看";
				}else if(id.contains("music")){
					this.status = "想听";
				}
			} 

		}
		return this.status;
	}
	public Subject getSubject() {
		return subject;
	}
	public void setSubject(Subject subject) {
		this.subject = subject;
	}
	public List<String> getTagList() {
		return tagList;
	}
	public void setTagList(List<String> tagList) {
		this.tagList = tagList;
	}
	public int getRating() {
		return rating;
	}
	public void setRating(int rating) {
		this.rating = rating;
	}
	public void getVRating(){
		
	}
	public void setMaxRating(int maxRating) {
		this.maxRating = maxRating;
	}
	public int getMaxRating() {
		return maxRating;
	}
}
